From: Georges Basile Stavracas Neto Date: Thu, 21 Nov 2019 21:50:11 +0000 (-0300) Subject: appIcon: Remove drag monitor on destroy X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~781^2^2~395 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e7b9bd75d8498ee3f9f9716282d5739b2936c65f;p=gnome-shell.git appIcon: Remove drag monitor on destroy It may happen that the app icon is destroyed with a drag monitor still around, in which case, a load of warnings will be shown. Make sure to remove any pending drag monitor on destroy. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/841 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index bc411b029..929caa12b 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -2133,6 +2133,7 @@ var AppIcon = GObject.registerClass({ }); } + this._dragMonitor = null; this._itemDragBeginId = Main.overview.connect( 'item-drag-begin', this._onDragBegin.bind(this)); this._itemDragEndId = Main.overview.connect( @@ -2157,6 +2158,12 @@ var AppIcon = GObject.registerClass({ } if (this._stateChangedId > 0) this.app.disconnect(this._stateChangedId); + + if (this._dragMonitor) { + DND.removeDragMonitor(this._dragMonitor); + this._dragMonitor = null; + } + if (this._draggable) { if (this._dragging) Main.overview.endItemDrag(this);